package com.summer.study.leetcode.tree;

import com.summer.study.leetcode.tree.enums.DfsSearchType;

import java.util.ArrayList;
import java.util.List;

/**
 * @auther: 杨杰
 * @date: 2019/7/30 14:32
 * @description:
 */
public class AbstractTree<E> implements Tree<E> {

    protected Node root;

    protected int size;

    protected int depth;

    protected List<Node<E>> nodeList = new ArrayList<>();

    public AbstractTree() {
        this.size = 0;
        this.depth = 0;
    }

    @Override
    public long size() {
        return size;
    }

    @Override
    public boolean isEmpty() {
        return size == 0;
    }

    @Override
    public long depth(boolean isMax) {
        throw new UnsupportedOperationException();
    }

    @Override
    public Node<E> getRoot() {
        return root;
    }

    @Override
    public boolean setRoot(Node<E> node) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean isLeaf(Node<E> node) {
        throw new UnsupportedOperationException();
    }

    @Override
    public List<Node<E>>  inOrder() {
        throw new UnsupportedOperationException();
    }

    @Override
    public List<Node<E>> preOrder() {
        throw new UnsupportedOperationException();
    }

    @Override
    public List<Node<E>> afterOrder() {
        throw new UnsupportedOperationException();
    }

    @Override
    public List<Node<E>> dfs(DfsSearchType type) {
        throw new UnsupportedOperationException();
    }

    @Override
    public List<Node<E>> bfs() {
        throw new UnsupportedOperationException();
    }

    @Override
    public List<List<E>> levelOrder() {
        throw new UnsupportedOperationException();
    }

    @Override
    public void init(Node<E> root) {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean insert(Node<E> node,Node<E> parent){
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean isSymmetric() {
        throw new UnsupportedOperationException();
    }
}
